package com.ebai.product.management.repository.system;

import java.util.List;

import javax.persistence.Table;

import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Repository;

import com.ebai.product.management.model.entity.Code;

@Repository
@Table(name="code")
@Qualifier("codeRepository")
public interface CodeRepository extends CrudRepository<Code, String>, JpaSpecificationExecutor<Code>{
	
	public Code save(Code code);

    public void deleteByPid(String pid);

    public void delete(Code entity);

    public Code findByPid(String pid);

    public List<Code> findAll();

	Page<Code> findAll(Specification<Code> specification, Pageable pageable);
}
